<!DOCTYPE html>
<html xmlns:v-bind="http://www.w3.org/1999/xhtml">
<head>
	<title>用户列表</title>
	<#include "/header.html">
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group " style="display:inline-block;" >
				<input type="text"  class="form-control"  v-model="q.userName" @keyup.enter="query" placeholder="用户姓名" style="display:inline-block;width: 140px;" >
				<input type="text" class="form-control" v-model="q.mobileNumber" @keyup.enter="query" placeholder="手机号" style="display:inline-block;width: 140px;">
				<input type="text"  id="startDate" class="form-control" v-model="q.startDate"  placeholder="开始时间" style="display:inline-block;width: 160px">
				<input type="text"  id="endDate" class="form-control" v-model="q.endDate"  placeholder="截止时间" style="display:inline-block;width: 160px">
				<select class="form-control" v-model="q.identity" @keyup.enter="query" style="display:inline-block;width: 140px;">
					<option value="" selected="selected">  ----请选择----</option>
					<option v-for="item in identity"  v-bind:value="item.code">{{ item.name }}</option>
				</select>
			</div>
			<div style="display: inline-block">
			<a class="btn btn-default" @click="query" style="margin-left: 30px">查询</a>
			<!--<a class="btn btn-info" @click="info"><i class="fa fa-info"></i>&nbsp;查看详情</a>-->
			<a class="btn btn-primary" @click="freeze"><i class="fa fa-hourglass"></i>&nbsp;冻结</a>
			<a class="btn btn-success" @click="unFreeze"><i class="fa fa-key"></i>&nbsp;解冻</a>
			<!--<a href="/users/user/exportUsers" class="btn btn-primary"><i class="fa fa-download"></i>&nbsp;导出用户</a>-->
			<a class="btn btn-success" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			</div>
		</div>
		<table id="jqGrid"></table>
		<div id="jqGridPager"></div>
	</div>

	<div v-show="!showList && !infoList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">手机号</div>
				<div class="col-sm-10">
					<input type="text" id="mobile" class="form-control" v-model="user.mobileNumber"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">姓名</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="user.userName"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">微信号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="user.weChat"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">等级</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" v-model="user.identityCode"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>

	<div v-show="infoList" class="panel panel-default">
		<div class="panel-heading">{{ userDetalTitle }}</div>
		<form class="form-horizontal">
			<div class="form-group">
				<div class="col-sm-2 control-label">头像</div>
				<div class="col-sm-10">
					<img   :src= "user.headSculpture" style="width: 40px;height: 40px;"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">真实姓名</div>
				<div class="col-sm-10">
					<input  class="form-control" v-model="user.realName" placeholder="" disabled="disabled"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">昵称</div>
				<div class="col-sm-10">
					<input  class="form-control" v-model="user.nickName" placeholder="" disabled="disabled"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">用户等级</div>
				<div class="col-sm-10">
					<input  class="form-control" v-model="user.identityName" placeholder="" disabled="disabled"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">联系电话</div>
				<div class="col-sm-10">
					<input  class="form-control" v-model="user.mobileNumber" placeholder="" disabled="disabled"/>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">推荐人</div>
				<div class="col-sm-10">
					<input  class="form-control" v-model="user.referralCode" placeholder="" disabled="disabled"/>
				</div>
			</div>
			<div v-for="accout of accouts" class="form-group">
				<div class="col-sm-2 control-label">{{ accout.accountTypeName }}</div>
				<div class="col-sm-10" >
					<input  class="form-control" v-model="accout.amount" placeholder="" disabled="disabled"/>

				</div>
				<input type="button" style="float:right;border-radius:5px;border:0;background: #3c8dbc;color: #fff;padding:4px 12px;margin:-30px -12px 0 0" @click="accoutDetail(accout.userId,accout.accountTypeCode)"  value="详情"/>
			</div>

			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-warning" @click="infoReload" value="返回"/>
			</div>
		</form>
	</div>
</div>


<script src="/users/script/user.js?_${.now?long}"></script>
</body>
</html>